package com.baidu.controller;

import com.baidu.entity.TbyBanktype;
import com.baidu.service.CreditBankService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 田甜
 * @version 1.0
 * @description: TODO
 * @date 2021/12/16 0016 9:06
 */
@RestController
@CrossOrigin
@Slf4j
@RequestMapping("/tby")
public class CreditBankController {

    @Autowired
    private CreditBankService creditBankService;

    //所有的银行卡下拉选取
    @PostMapping("/banktype")
    public List<TbyBanktype> bankcard(){
        log.info("所有的银行卡");
        return creditBankService.bancard();
    }
}
